<script setup>
  const props = defineProps({
    leftText: {
      type: String,
      default: '左侧文本'
    }
  })

  const emit = defineEmits(['click'])

  const onClick = (e) => {
    // 触发 tap 事件
    emit('click', e)
  }
</script>

<template>
  <view
    class="cell"
    @click="onClick"
  >
    <view>{{ props.leftText }}</view>
    <image
      class="jiantou"
      src="https://bitejiaoyan.oss-cn-chengdu.aliyuncs.com/bitehouse/web/profile/jiantou.png"
      mode="scaleToFill"
    />
  </view>
</template>

<style lang="scss" scoped>
  @import '@/styles/variable.scss';
  .cell {
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100rpx;
    padding: 0 33rpx 0 57rpx;
    margin-bottom: 20rpx;
    border-radius: 16rpx;
    background-color: #fff;
    font-size: var(--font-size-md);
    color: var(--text-color-dark);
    font-weight: 600;
    .jiantou {
      width: 26rpx;
      height: 26rpx;
    }
  }
</style>
